<html layout:decorator="public/layout" xmlns:miguo="http://www.w3.org/1999/html">
<div layout:fragment="content">

    <!-- 表格工具栏 -->
    <form class="layui-form toolbar">
        <div class="layui-form-item">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" name="username" placeholder="请输入用户名" autocomplete="off" class="layui-input">
                </div>
            </div>
            <!-- 设备类型下拉单选 -->
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <widget:singleSelect name="device|0|设备类型|name|id" th:data="${MEMBER_DEVICE_LIST}" value="0"/>
                </div>
            </div>
            <!-- 来源下拉单选 -->
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <widget:singleSelect name="source|0|用户来源|name|id" th:data="${MEMBER_SOURCE_LIST}" value="0"/>
                </div>
            </div>
            <!-- 是否启用下拉单选 -->
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <widget:singleSelect name="status|0|是否启用|name|id" th:data="${MEMBER_STATUS_LIST}" value="0"/>
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline" style="width: auto;">
                    <widget:btnQuery name="查询"/>
                    <widget:btnAdd shiro:hasPermission="sys:member:add" name="添加会员"/>
                    <widget:btnDAll shiro:hasPermission="sys:member:dall" name="批量删除"/>
                </div>
            </div>
        </div>
    </form>

    <!-- 数据表格 -->
    <table class="layui-hide" id="tableList" lay-filter="tableList"></table>

    <!-- 表格操作列 -->
    <script type="text/html" id="toolBar">
        <widget:btnDel shiro:hasPermission="sys:member:delete" name="删除"/>
        {{#  if(d.source == 2){ }}
        <widget:btnEdit shiro:hasPermission="sys:member:update" name="编辑"/>
        {{#  } }}
    </script>

    <!-- 状态 -->
    <script type="text/html" id="statusTpl">
        <input type="checkbox" name="status" value="{{ d.id }}" lay-skin="switch" lay-text="启用|停用" lay-filter="status" {{ d.status == 1 ? 'checked' : '' }} >
    </script>
</div>
</html>